package com.xdap.pg.exam.entity;

import com.definesys.mpaas.query.annotation.Column;
import com.definesys.mpaas.query.annotation.Style;
import com.definesys.mpaas.query.annotation.SystemColumn;
import com.definesys.mpaas.query.annotation.SystemColumnType;
import com.definesys.mpaas.query.json.MpaasDateTimeDeserializer;
import com.definesys.mpaas.query.json.MpaasDateTimeSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.util.Date;

@Style(Upper2Underline = true)
public class BasePojo implements java.io.Serializable {
    private static final long serialVersionUID = -197494488083014880L;

    @SystemColumn(SystemColumnType.OWNER)
    private String owner;

    @Column("created_by")
    @SystemColumn(SystemColumnType.CREATE_BY)
    private String createdBy;

    @Column("last_updated_by")
    @SystemColumn(SystemColumnType.LASTUPDATE_BY)
    private String lastUpdatedBy;

    @JsonDeserialize(using = MpaasDateTimeDeserializer.class)
    @JsonSerialize(using = MpaasDateTimeSerializer.class)
    @Column("creation_date")
    @SystemColumn(SystemColumnType.CREATE_ON)
    private Date creationDate;

    @JsonDeserialize(using = MpaasDateTimeDeserializer.class)
    @JsonSerialize(using = MpaasDateTimeSerializer.class)
    @Column("last_update_date")
    @SystemColumn(SystemColumnType.LASTUPDATE_ON)
    private Date lastUpdateDate;

    @Column("object_version_number")
    @SystemColumn(SystemColumnType.OBJECT_VERSION)
    private Integer objectVersionNumber;

    @Column("tenant_id")
    @SystemColumn(SystemColumnType.TENANT)
    private String tenantId;

    public BasePojo() {
    }

    public String getOwner() {
        return this.owner;
    }

    public String getCreatedBy() {
        return this.createdBy;
    }

    public String getLastUpdatedBy() {
        return this.lastUpdatedBy;
    }

    public Date getCreationDate() {
        return this.creationDate;
    }

    public Date getLastUpdateDate() {
        return this.lastUpdateDate;
    }

    public Integer getObjectVersionNumber() {
        return this.objectVersionNumber;
    }

    public String getTenantId() {
        return this.tenantId;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public void setLastUpdatedBy(String lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public void setCreationDate(Date creationDate) {
        this.creationDate = creationDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    public void setObjectVersionNumber(Integer objectVersionNumber) {
        this.objectVersionNumber = objectVersionNumber;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }
}
